<!--
 * @Description: 重定向
 * @Author: DHL
 * @Date: 2022-01-16 18:40:58
 * @LastEditors: DHL
 * @LastEditTime: 2022-04-20 11:10:33
-->

<template>
  <div></div>
</template>

<script setup lang="ts">
  import { useRoute, useRouter } from 'vue-router'
  import { log } from '/@/utils/log'

  const { params, query } = useRoute()

  const { path } = params

  useRouter()
    .replace({ path: '/' + path, query })
    .catch((err) => {
      log.warn('重定向', err)
    })
</script>
